package com.yundasys.lab02springbootstudy.listener;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Service;

/**
 * 自定义的系统广播监听器，接收所有类型的消息
 *
 * @author jiangta
 * @version 1.0
 * @date 2021/1/20 1:49 下午
 */
@Service
public class AllEventListener implements ApplicationListener<ApplicationEvent> {
    @Override
    public void onApplicationEvent(ApplicationEvent applicationEvent) {

        //为了便于了解调用栈，在日志中打印当前堆栈
        //Utils.printTrack("onApplicationEvent : " + applicationEvent);
    }
}
